package cn.gson.crm.model.pojos;

import javax.persistence.*;

@Entity
public class Purchasexq {
    private Integer purchasexqId;
    private Long purchasexqDj;
    private Long purchasexqNumber;
    private String purchasexqBz;
    private Purchase purchase;
    private String purchasexqCc;
    private String purchasexqYs;
    private String purchasexqDw;
    private String purchaseName;
    private Pro pro10;
    private Supplier supplier;

    public Purchasexq() {
    }



    @Id
    @Column(name = "purchasexq_id")
    @GeneratedValue(generator  =  "seq",strategy  =  GenerationType.SEQUENCE)
    //定义一个序列生成器
    @SequenceGenerator(name  =  "seq",sequenceName  =  "tmq",
            initialValue  =  1,allocationSize  =  1)
    public Integer getPurchasexqId() {
        return purchasexqId;
    }

    public void setPurchasexqId(Integer purchasexqId) {
        this.purchasexqId = purchasexqId;
    }

    @Basic
    @Column(name = "purchasexq_dj")
    public Long getPurchasexqDj() {
        return purchasexqDj;
    }

    public void setPurchasexqDj(Long purchasexqDj) {
        this.purchasexqDj = purchasexqDj;
    }

    @Basic
    @Column(name = "purchasexq_number")
    public Long getPurchasexqNumber() {
        return purchasexqNumber;
    }

    public void setPurchasexqNumber(Long purchasexqNumber) {
        this.purchasexqNumber = purchasexqNumber;
    }

    @Basic
    @Column(name = "purchasexq_bz")
    public String getPurchasexqBz() {
        return purchasexqBz;
    }

    public void setPurchasexqBz(String purchasexqBz) {
        this.purchasexqBz = purchasexqBz;
    }


    @ManyToOne
    @JoinColumn(name = "purchase_id")
    public Purchase getPurchase() {
        return purchase;
    }

    public void setPurchase(Purchase purchase) {
        this.purchase = purchase;
    }

    @ManyToOne
    @JoinColumn(name = "cp_id")
    public Pro getPro10() {
        return pro10;
    }

    public void setPro10(Pro pro10) {
        this.pro10 = pro10;
    }

    @ManyToOne
    @JoinColumn(name = "supplier_id")
    public Supplier getSupplier() {
        return supplier;
    }

    public void setSupplier(Supplier supplier) {
        this.supplier = supplier;
    }

    @Basic
    @Column(name = "purchasexq_cc")
    public String getPurchasexqCc() {
        return purchasexqCc;
    }

    public void setPurchasexqCc(String purchasexqCc) {
        this.purchasexqCc = purchasexqCc;
    }
    @Basic
    @Column(name = "purchasexq_ys")
    public String getPurchasexqYs() {
        return purchasexqYs;
    }

    public void setPurchasexqYs(String purchasexqYs) {
        this.purchasexqYs = purchasexqYs;
    }
    @Basic
    @Column(name = "purchasexq_dw")
    public String getPurchasexqDw() {
        return purchasexqDw;
    }

    public void setPurchasexqDw(String purchasexqDw) {
        this.purchasexqDw = purchasexqDw;
    }
    @Basic
    @Column(name = "purchase_name")
    public String getPurchaseName() {
        return purchaseName;
    }

    public void setPurchaseName(String purchaseName) {
        this.purchaseName = purchaseName;
    }

    @Override
    public String toString() {
        return "Purchasexq{" +
                "purchasexqId=" + purchasexqId +
                ", purchasexqDj=" + purchasexqDj +
                ", purchasexqNumber=" + purchasexqNumber +
                ", purchasexqBz='" + purchasexqBz + '\'' +
                '}';
    }
}
